
#ifndef EASYVIEW_H
#define EASYVIEW_H
#include<QGraphicsView>
#include<QGraphicsScene>
#include<QBrush>
#include<QIcon>
#include<QResizeEvent>
#include<QTimer>
#include<QPoint>
#include<QLineF>

#include"gun.h"
#include"fish.h"
#include"fish2.h"
#include"boom.h"

class Easyview:public QGraphicsView
{
public:
    Easyview();
    void resizeEvent(QResizeEvent*);//用于调整游戏窗口的函数
    void mouseMoveEvent(QMouseEvent*);//用于移动鼠标控制大炮方向的函数
    void mousePressEvent(QMouseEvent*);//用于点击鼠标发射炮弹


private:
    QTimer *timer;//计时器
    QGraphicsScene *scene;//构建场景
    Gun*gun;//大炮


    //从左向右游的鱼
    Fish*fish1;
    Fish*fish2;
    Fish*fish3;
    Fish*fish4;
    Fish*fish5;


   //从右向左游的鱼
    Fish2*fish_1;
    Fish2*fish_2;
    Fish2*fish_3;
    Fish2*fish_4;
    Fish2*fish_5;


};

#endif // EASYVIEW_H
